<?php
namespace app\wenchuang\validate;

use think\Validate;

class ArticleNoticeValidate extends Validate
{
    protected $rule = [
        'title' => 'require|max:30',
        'abstract' => 'max:100',
        'author' => 'max:15',
    ];

    protected $message = [
        'title.require' => '文章标题不能为空',
        'title.max' => '文章标题最多30个字符',
        'abstract.max' => '文章摘要最多100个字符',
        'author.max' => '文章作者最多15个字符',
    ];

    protected $scene = [
        'add' => ['title', 'abstract', 'author']
    ];
}
